#! /bin/bash
# This script generate uflp instance to see the solution
gensets ()
{
echo "Sets"
echo "    i     /i1 * i$1/"
echo "    j     /j1 * j$2/"
}

genout()
{
echo "*Convert opt file"
echo "CPlexLP uflp_$1_$2.lp"
}

#if [ $# -eq 0 ]; then
#    echo "Please enter the number of locations and clients"
#    return 0
#fi

gensets $1 $2 > setparam.inc
genout  $1 $2 > convert.opt
gams uflp.gms -lo 0 suppress=1

echo "Generate uflp instance with $1 customers and $2 clients"

#Clean things up
rm setparam.inc
rm convert.opt
rm uflp.lst
